import request from '../utils/request'

export function getPerms(username) {
    return request({
        url: '/api/user/'+username,
        method: 'get',
    })

}
export function getAllPerms() {
    return request({
        url: '/api/permission/all',
        method: 'get',
    })

}
export function getOnePerms(userName) {
    return request({
        url: '/api/user/perms/'+userName,
        method: 'get',
    })
}
export function updateOnePerms(params) {
    return request({
        url: '/api/permission/updateOne',
        method: 'put',
        data: params
    })
}
export function deleteOne(id) {
    return request({
        url: '/api/permission/deleteOne/'+id,
        method: 'delete',
    })
}
